package com.youme.section.shop.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.hyphenate.easeim.R
import com.salton123.app.BaseApplication
import com.youme.model.Rest

/**
 * Time:4/3/21 3:42 PM
 * Author:
 * Description:
 */
class InfoAdapterListAdapter : BaseQuickAdapter<Rest, BaseViewHolder>(R.layout.adapter_favorite_item) {

    override fun convert(helper: BaseViewHolder, item: Rest?) {
        item?.apply {
            helper.setText(R.id.tv_dian_name, restName)
                .setText(R.id.tv_prices, "¥ $userPrice/人")
                .setText(R.id.tv_juli, distance + "km")
            Glide.with(BaseApplication.sInstance)
                .load(restPic).into(helper.getView<ImageView>(R.id.im_favorite))
        }
    }
}